package com.guigu.tms.manager.controller;

import com.github.pagehelper.PageInfo;
import com.guigu.tms.commons.aggregation.entity.TransportOrder;
import com.guigu.tms.commons.aggregation.entity.TransportOrderQuery;
import com.guigu.tms.commons.aggregation.feign.TransportOrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("transportOrder")
@RestController
public class TransportOrderController {
    @Autowired
    private TransportOrderFeignClient transportOrderFeignClient;
    @PostMapping("getTransportOrders/{num}/{size}")
    public PageInfo<TransportOrder> getTransportOrders(@RequestBody TransportOrderQuery transportOrderQuery, @PathVariable("num") Integer num, @PathVariable("size")Integer size){
        return transportOrderFeignClient.getTransportOrders(transportOrderQuery, num, size);
    }
}
